#include "TeamTake.h"
#include <vector>
#include "Card.h"



TeamTake::TeamTake()
{

}

TeamTake::~TeamTake()
{
	if(bonuses.size() > 0)
		bonuses.clear();
	deck.clearDeck();

}

void TeamTake::addCard(Card * card)
{
	deck.addCard(card);
}

void TeamTake::addBonus(Bonus bonus)
{
	bonuses.push_back(bonus);
}

int TeamTake::getPointsFromCards()
{
	int points = 0;

	for(vector<Card*>::iterator it = deck.first();it != deck.last();++it)
	{
		points += (*it)->score;
	}

	return points;
}

void TeamTake::reset()
{
	deck.clearDeck();
	bonuses.clear();
}